import React from 'react';
import { Router, Scene, Stack } from "react-native-router-flux";
import main from './main/components/main.js'
import question from './main/components/question.js'
import answer from './main/components/answer.js'
import answers from './main/components/answers.js'
import comments from './main/components/comments.js'
import writeAnswer from './main/components/writeAnswer.js'

import { Provider } from 'mobx-react'
import AppStore from './main/mobx/appStore.js'


export default App = () => {
  return (
    <Provider store={AppStore}>
      <Router>
        <Stack key="root">
          <Scene key="main" component={main} hideNavBar={true}/>
          <Scene key="question" component={question}  title="请拍取题目" titleStyle={{textAlign:'center'}}/>
          <Scene key="answers" component={answers}  title="查找到的题目" titleStyle={{textAlign:'center'}}/>
          <Scene key="answer" component={answer}  title="回答" titleStyle={{textAlign:'center'}}/>
          <Scene key="comments" component={comments}  title="评论" titleStyle={{textAlign:'center'}}/>
          <Scene key="writeAnswer" component={writeAnswer}  title="写入你的答案" titleStyle={{textAlign:'center'}}/>
        </Stack>
      </Router>
     </Provider>
  );
};